package com.helpustotravel.utils;

import org.apache.commons.lang.StringEscapeUtils;

public class StringUtils {

	public static String escapeJavascript(String chaine) {
		String ret = StringEscapeUtils.escapeJavaScript(chaine);
		ret = ret.replaceAll("\\\\'", "'");
		return ret;
	}
	
	public static String concat500(String str) {
		if(str.length() > 500) {
			return str.substring(0, 499);
		} else {
			return str;
		}
	}
}
